package com.hnl.core;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

public class HNLAttachmenInitializer {
	public static final Logger LOG = LoggerFactory
			.getLogger(HNLAttachmenInitializer.class);

	public static void initAttachment() {
		NodeList elems = HNLCore.getHNLConfig().getDoc()
				.getElementsByTagName(HNLConfig.CONFIG);

		try {
			AttachmentConfig attachmentConfig = new AttachmentConfig();
			attachmentConfig.readAttachmentSourcesFromXml((Element) elems
					.item(0));

		} catch (Exception e) {
			LOG.error("Attachment initialization failed", e);
		}
	}

}
